<script setup>
import {RouterView } from 'vue-router'
window.vscode = acquireVsCodeApi();

// window.vscode = {
//   postMessage:(...args)=>{
//     console.log(...args)
//   }
// }

window.document.documentElement.setAttribute('theme', 'dark');
const debounce = (callback, delay) => {
      let tid;
      return function (...args) {
        const ctx = self;
        tid && clearTimeout(tid);
        tid = setTimeout(() => {
          callback.apply(ctx, args);
        }, delay);
      };
    };
const _ = (window).ResizeObserver;
    (window).ResizeObserver = class ResizeObserver extends _ {
      constructor(callback) {
        callback = debounce(callback, 20);
        super(callback);
      }
    };
</script>

<template>
  <RouterView />
</template>

<style>
body{
  margin: 0;
}
::-webkit-scrollbar
{ 
  width: 7px; 
  height: 7px;
}
  
::-webkit-scrollbar-track 
{ 
  border-radius: 10px; 
  background-color: rgba(0,0,0,0.1); 
} 
  
::-webkit-scrollbar-thumb 
{ 
  border-radius: 10px; 
  -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3); 
  background-color: #909093;
} 

::-webkit-scrollbar-track-horizontal {
  height: 5px;
  background-color: #f0f0f0;
}
</style>
